//#include "MSM_SimulationRecording.h"
//
//const static unsigned int DEFAULT_FRAME_ALLOCATION = 100u;
//
//Sx::Simulation::Recording::MSM_SimulationRecording::MSM_SimulationRecording() {
//	this->simulation = nullptr;
//	this->frames = Util::ArrayList<MSM_SimulationFrame>(DEFAULT_FRAME_ALLOCATION, MSM_SimulationFrame());
//	this->freeIndex = 0;
//}
//
//Sx::Simulation::Recording::MSM_SimulationRecording::~MSM_SimulationRecording() {
//	/* this->simulation is not owned by this class */
//}
//
//bool Sx::Simulation::Recording::MSM_SimulationRecording::setSimulation(Simulations::MassSpringSimulation* simulation) {
//	if ( simulation == nullptr ) {
//		std::cerr << "[MSM_SimulationRecording:setSimulation] Error: Cannot set recording simulation to nullptr." << std::endl;
//		return false;
//	}
//	
//	this->simulation = simulation;
//	return true;	
//}
//
//Sx::Simulation::Recording::MSM_SimulationFrame& Sx::Simulation::Recording::MSM_SimulationRecording::getNextFrame() {
//	if ( this->freeIndex == this->frames.capacity() ) {
//		this->frames.resize(this->frames.size() * 2);
//	}
//
//	Sx::Simulation::Recording::MSM_SimulationFrame& frame = this->frames[this->freeIndex];
//	this->freeIndex++;
//	return frame;
//}
//
//Sx::Simulation::Recording::MSM_SimulationFrame& Sx::Simulation::Recording::MSM_SimulationRecording::getFrame(unsigned int index, bool& success) {
//	if ( index >= this->freeIndex ) {
//		success = false;
//		return this->frames[0];
//	}
//
//	success = true;
//	return this->frames[index];
//}
//
//unsigned int Sx::Simulation::Recording::MSM_SimulationRecording::size() const {
//	if ( this->freeIndex == 0 ) return 0;
//	return this->frames.size();
//}
//
//unsigned int Sx::Simulation::Recording::MSM_SimulationRecording::getFrameCount() const {
//	if ( this->freeIndex == 0 ) return 0;
//	return this->frames.size();
//}
//
//unsigned int Sx::Simulation::Recording::MSM_SimulationRecording::getNumFrames() const {
//	if ( this->freeIndex == 0 ) return 0;
//	return this->frames.size();
//}
//
//void Sx::Simulation::Recording::MSM_SimulationRecording::reset() {
//	this->freeIndex = 0;
//	this->frames.clear();
//	this->frames = Util::ArrayList<MSM_SimulationFrame>(DEFAULT_FRAME_ALLOCATION, MSM_SimulationFrame());
//	this->simulation = nullptr;
//}
